package wk.asm.test;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * Created by wangkuan at 2018-09-07 8:23
 */
public class MyProxy implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        System.out.println("开始");

        Object result = methodProxy.invokeSuper(o, objects);

        System.out.println("结束");

        return result;
    }
}
